﻿using Propro.Enum;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;
using System.Web.Security;

namespace Propro.Models
{


    public class Project
    {
        [Key]
        public int ProjectId { get; set; }

        [Required]
        [StringLength(128)]
        public string Name { get; set; }

        [Required]
        [StringLength(512)]
        public string ShortDescription { get; set; }

        [Required]
        [StringLength(2048)]
        public string Description { get; set; }

        [DisplayFormat(DataFormatString = "{0:dd/MM/yyyy}")]
        [Display(Name="Date of project creation")]
        public DateTime CreationDate { get; set; }

        [Required]
        public State State { get; set; }

        public virtual ICollection<UserProfile> Members { get; set; }
        public virtual ICollection<Downloads> Downloads { get; set; }
        public virtual ICollection<Updates> Updates { get; set; }

        public Project()
        {
            Members = new List<UserProfile>();
            Downloads = new List<Downloads>();
            Updates = new List<Updates>();
        }

        
    }
}